package com.wodogs.tasks;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.wodogs.recharge.BattlenetProcess;

@Component
public class RechargeTask {

	@Autowired
	private BattlenetProcess process;
	
	@Scheduled(cron = "* * * * * *")
//	@Scheduled(cron = "0 35 17  * * *")
//	@Scheduled(cron = "0 36 17  * * *")
	public void execute() {
		try {
//			BattlenetProcess process = new BattlenetProcess();
			process.go();
		} catch (InterruptedException e) {
			System.err.println(e.getMessage());
		}
	}
}